<!DOCTYPE HTML>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>upm.io</title>
        <link rel="stylesheet" href="assets/css/bootstrap.min.css" />
        <link rel="stylesheet" href="assets/js/libs/fancybox/jquery.fancybox.css" />
        <link rel="stylesheet" href="assets/css/main.css" />
    </head>
    <body class="page-pool" data-page="pool">
        <?php include("common-tpl/topnav.php") ?>
        <?php include("common-tpl/topstatus.php") ?>
        
        <div class="container ptm pbm">
            <!-- <div class="col-md-2">
                <div class="clearfix">
                    <div class="fn-left">
                        <h4>资源池管理</h4>
                    </div>
                </div>
                <table class="table table-bordered">
                    <tr>
                      <td>主机池管理</td>
                    </tr>
                    <tr class="active">
                      <td><a href="pool-list.php">主机池列表</a></td>
                    </tr>
                    <tr>
                      <td><a href="javascript:void(0)">主机提供源</a></td>
                    </tr>
                </table>
                <table class="table table-bordered">
                    <tr>
                      <td>网络池规划</td>
                    </tr>
                    <tr>
                      <td><a href="intranet-plan.php">内网规则</a></td>
                    </tr>
                    <tr>
                      <td><a href="extranet-plan.php">外网规则</a></td>
                    </tr>
                </table>
            </div> -->
            <div class="col-md-12">
                <h4>选择资源池</h4>
                <div class="row pbl">
                    <div class="col-md-12">
                        <div class="text-right">
                            <button class="btn btn-default" type="button" data-toggle="modal" data-target="#addpool">
                                添加Pool
                            </button>
                        </div>
                        <div class="bg-gray mtsm mbsm">
                            <button id="delete_popbtn" class="btn btn-default" type="button">
                                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                                删除
                            </button>
                        </div>
                        <table id="pool_list" class="table table-bordered">
                            <thead>
                                <tr>
                                    <td><input class="checked_all mrs" id="checked_all" type="checkbox"><label for="checked_all">全选</label></td>
                                    <td>名称</td>
                                    <td>使用率</td>
                                    <td>分配策略</td>
                                </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                        <script type="text/x-jquery-tmpl" id="poolListTemplate">
                            <tr>
                                <td><input class="form_checkbox mrs" data-poolid="${pool_id}" data-name="${name}" type="checkbox"></td>
                                <td><a href="pool-pot.php?pool_id=${pool_id}&pool_name=${name}">${name}</a></td>
                                <td>${up}/${all}</td>
                                <td>swf</td>
                            </tr>
                        </script>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="modal fade" id="deletepool" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">删除Pool</h4>
                    </div>
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="delete_list_wrap">
                                    <table id="delete_pool_list" class="table table-bordered">
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="clearfix pbm">
                                    <button id="delete_btn" class="btn btn-default" type="button">
                                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                                        删除
                                    </button>
                                    <button id="cancel_btn" class="btn btn-default" type="button">
                                        取消
                                    </button>
                                </div>
                                <script type="text/x-jquery-tmpl" id="poolDeleteTemplate">
                                    <tr>
                                        <td>资源池:</td>
                                        <td><span data-poolid="${poolid}">${name}</span></td>
                                    </tr>
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal fade" id="addpool" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">添加Pool</h4>
                    </div>
                    <div class="modal-body">
                        <div class="container">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            <form class="form-horizontal" id="">
                                                <div class="form-group">
                                                    <label for="username" class="col-sm-2 control-label">name</label>
                                                    <div class="col-sm-10">
                                                        <input type="text" class="form-control" name="name" id="name" placeholder="name">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label for="password" class="col-sm-2 control-label">分配</label>
                                                    <div class="col-sm-10">
                                                        <select name="" id="" class="form-control">
                                                            <option value="swf">swf</option>
                                                            <option value="os">os</option>
                                                            <option value="hw">hw</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-offset-2 col-sm-10">
                                                        <button type="button" class="btn btn-default" id="submit">Submit</button>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div><!-- /.container -->
                    </div>
                </div>
            </div>
        </div>

        <?php include("common-tpl/bottomtpl.php") ?>

        <script src="assets/js/seajs/sea.js"></script>
        <script type="text/javascript">
            seajs.use('seajs/compass.js');
        </script>
    </body>
</html>
